package svc

import (
	"github.com/zeromicro/go-zero/zrpc"
	"person/api/internal/config"
	"person/personurpc/personurpcclient"
)

type ServiceContext struct {
	Config     config.Config
	PersonuRpc personurpcclient.Personurpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:     c,
		PersonuRpc: personurpcclient.NewPersonurpc(zrpc.MustNewClient(c.PersonuRpc)),
	}
}
